class MyShopCarEntity {
  MyShopCarData data;
  int code;
  String msg;

  MyShopCarEntity({this.data, this.code, this.msg});

  MyShopCarEntity.fromJson(Map<String, dynamic> json) {
    data =
        json['data'] != null ? new MyShopCarData.fromJson(json['data']) : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class MyShopCarData {
  List<MyShopCarDataData> datas;
  List<MyShopCarDataData> datas2;
  MyShopCarData();

  MyShopCarData.fromJson(Map<String, dynamic> json) {
    if (json['effective_list'] != null) {
      datas = new List<MyShopCarDataData>();
      (json['effective_list'] as List).forEach((v) {
        datas.add(new MyShopCarDataData.fromJson(v));
      });
    }
    if (json['failure_list'] != null) {
      datas2 = new List<MyShopCarDataData>();
      (json['failure_list'] as List).forEach((v) {
        datas2.add(new MyShopCarDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class MyShopCarDataData {
// id
// 收货地址ID
// user_id
// 用户ID
// merchant_id
// 省份
// goods_id
// 城市
// goods_num
// 城市
// goods_name
// 详细地址
// company
// 单位名称
// img
// 收件人
// old_price
// 联系电话
// postcode
// 邮编
// price
// 是否为默认地址 Y是 N否

// tmp_img

// postage
// clicknum
// inventory
// sales_volume
// virtual_volume
// sku_str
  bool isSelect = false;
  String id;
  String user_id;
  String merchant_id;
  String goods_id;
  String goods_num;
  String goods_name;
  String img;
  String lv_price;
  String old_price;
  String price;
  String sku_str;
  String end_time;
  List<GoodsListDataDatasTag> sku_arr;

  MyShopCarDataData(
      {this.id,
      this.user_id,
      this.merchant_id,
      this.goods_id,
      this.goods_num,
      this.goods_name,
      this.sku_str,
      this.img,
      this.sku_arr,
      this.old_price,
      this.price});

  MyShopCarDataData.fromJson(Map<String, dynamic> json) {
    id = json['id'].toString();
    user_id = json['user_id'].toString();
    merchant_id = json['merchant_id'].toString();
    goods_id = json['goods_id'].toString();
    goods_num = json['goods_num'].toString();
    lv_price = json['lv_price'].toString();
    goods_name = json['goods_name'];
    end_time = json['end_time'];
    sku_str = json['sku_str'];
    img = json['img'].toString().replaceAll("\\", "/");
    old_price = json['old_price'].toString();
    price = json['price'].toString();
    sku_arr = new List<GoodsListDataDatasTag>();
    (json['sku_arr'] as List).forEach((v) {
      sku_arr.add(new GoodsListDataDatasTag.fromJson(v));
    });
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['user_id'] = this.user_id;
    data['merchant_id'] = this.merchant_id;
    data['goods_id'] = this.goods_id;
    data['goods_num'] = this.goods_num;
    data['goods_name'] = this.goods_name;
    data['old_price'] = this.old_price;
    data['img'] = this.img;
    data['price'] = this.price;

    return data;
  }
}

class GoodsListDataDatasTag {
  String attribute_id;
  String value;
  String attribute_name;
  GoodsListDataDatasTag({this.attribute_id, this.value, this.attribute_name});

  GoodsListDataDatasTag.fromJson(Map<String, dynamic> json) {
    attribute_id = json['attribute_id'].toString();
    value = json['value'].toString();
    attribute_name = json['attribute_name'].toString().replaceAll("\\", "/");
  }
}
